home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 50
/
050.d81
/
video craps
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
9KB
|
291 lines
0 data255,255,255,231,255,255,255,0,255,159,255,255,255,249,255,0,255,159,255
1 data231,255,249,255,0,255,153,255,255,255,153,255,0,255,153,255,231,255,153
2 data255,0,255,153,255,153,255,153,255,0,0,0,0,24,24,0,0,0,240,96,96,102,9,9,6
3 poke53265,0:poke53280,5:poke53281,5:a=ti:b=rnd(-a):sc=5000:s=54272:gosub1000
4 pokes+24,5:poke53272,(peek(53272)and240)+12:pokea,127:poke1,51:poke781,9
5 poke782,0:poke90,0:poke91,216:poke88,0:poke89,56:sys41964:poke1,55:pokea,129
6 poke56,48:a=12288:forb=atoa+7:readc:pokeb,c:next:a=a+216:forb=atoa+39:readc
7 pokeb,c:next:a=a+80:forb=atoa+14:readc:pokeb,c:next:r=12:dimp(21),c$(22)
8 a$(0)="[144] [146]":a$(1)="[144] [209] [146]":a$(2)="[144][209] [209][146]":a$(3)="[144][209] [146]":a$(4)="[144] [209][146]"
9 a$=" big ":b$="hardway ":c$=" craps ":d$=" place ":c$(0)=" "
10 c$(1)=c$(0):c$(2)="any craps ":c$(3)=" eleven ":c$(4)=" field "
11 c$(5)=a$+"6 ":c$(6)=a$+"8 ":c$(7)=b$+"4 ":c$(8)=b$+"6 ":c$(9)=b$+"8 "
12 c$(10)=b$+"10":c$(11)=c$+"2 ":c$(12)=c$+"3 ":c$(13)=c$+"12 ":ty%=4:ln%=4
13 c$(14)=" seven ":c$(15)=d$+"4 ":c$(16)=d$+"5 ":c$(17)=d$+"6 "
14 c$(18)=d$+"8 ":c$(19)=d$+"9 ":c$(20)=d$+"10 ":c$(21)=c$(1):c$(22)=c$(0)
15 print"[147][158][176][195][195][195][178][195][195][195][178][195][195][178][195][195][178][195][195][178][195][195][178][195][195][178][195][195][195][178][195][195][195][195][195][195][195][195][195][195][195][174]";
16 a$="[194] [194] [144]":b$=" [158][194] [194] [194] [194] [194] [194] ":printa$"d"b$"[194] seven [158][194]";
17 c$=" [158][171][195][195][219][195][195][219][195][195][219][195][195][219][195][195][219][195][195][195]":printa$"o"c$"[179] 4&1 [194]";
18 printa$"n"c$"[219][195][195][195][195][195][195][195][195][195][195][195][179]";:printa$"'"b$"[171][195][195]hardway[195][195][179]";
19 print"[194] p [194] [144]t [158][194] 4[194] 5[194] 6[194] 8[194] 9[194] 10[194] \ \ [194] ^ ^ [194]";:c$="[195][195][195][195][195][219][195][195][195][195][195][179]"
20 print"[194] a [194] [144] "b$"[194] 9&1 [194] 7&1 [194]";:b$="[158][194] "
21 print"[194] s [194] [144]p [158][171][195][195][177][195][195][177][195][195][177][195][195][177][195][195][177][195][195][195][219]"c$;:print"[194] s [194][144] a "b$"[194] ] ] [194] [ [ [194]";
22 printa$"s [158][194] 3%4%9%10%11 [194] 9&1 [194] 7&1 [194]";
23 print"[194] l [194] [144]s [158][194] % % [171]"c$;
24 print"[194] i [194] [194] 2 12 [194] @ [ [158][194] _ _ [158][194]";
25 print"[194] n [194][144]bar"b$"[194]15&1 [194] 30&1[194]";:a$="[194] [171][195][195][195][219][195][195][195]"
26 print"[194] e [194][144]_ _[158][194] field [171]"c$;:b$=c$(0)+" "
27 printa$"[174]"b$"[194] _ ^ [158][194] @ @ [158][194]";:c$="[195][195][195][195][195][195][195][195][195][195]"
28 print"[194] [194]big[158][194]big[158][171]"c$"[195][195][195][195][179]15&1 [194] 30&1[194]";:printa$"[179]"b$"[171][195][195][195][195][195][177][195][195][195][195][195][179]";
29 a$="[194] [194] [194] [194]":printa$"[144] don't bar [158][194] any craps [158][194]";
30 print"[194] [194] 6 [158][194] 8 [158][194][144] pass _ _ [158][194] 7&1 [194]";:printa$b$"[171]"c$"[195][189]";
31 print"[194] [202][195][195][195][177][195][195][195][177]"c$"[195][195][195][195][179][144][176]"c$"[174]";:a$="[158][194] "
32 b$=" [194][144][194] [194]":printa$b$;:print"[158][194] pass line"b$;
33 printa$b$;:print"[158][202]"c$c$"[195][195][195][195][195][195][189][144][173]"c$"";:poke2023,125:poke56295,0:goto64
34 x=29:fory=21to23:xy$=" ":gosub35:next:return
35 poke783,peek(783)and254:poke782,x:poke781,y:sys65520:printxy$;
36 poke783,peek(783)or1:return
37 ifsc<2then34
38 gosub34:y=21:xy$="you have: ":gosub35:x=36-len(str$(sc)):y=23
39 xy$="$"+str$(sc):gosub35:gosub40:return
40 pokes+1,r:pokes+5,9:pokes+4,21:forz=1to900:next:pokes+4,20:return
41 gosub34:y=21:xy$="<[158]p>ass":gosub35:y=22:xy$=" <[158]d>on't":gosub35
42 x=35:y=23:xy$="pass":gosub35:goto40
43 gosub34:y=21:xy$="how much: ":gosub35:x=33:y=23:xy$="":gosub35
44 gosub261:poke1983,66:poke56255,0:p(a)=val(qx$):ifp(a)<2 or p(a)>2000then43
45 sc=sc-p(a):ifsc<0thensc=sc+p(a):goto43
46 return
47 gosub34:y=21:xy$=" <[158]b>et":gosub35:y=23:xy$=" <[158]r>oll ":gosub35:goto40
48 on t goto49,50,51,52,53,54
49 u=0:v=1:w=0:goto55
50 u=3:v=0:w=4:goto55
51 u=3:v=1:w=4:goto55
52 u=2:v=0:w=2:goto55
53 u=2:v=1:w=2:goto55
54 u=2:v=2:w=2
55 y=21:xy$=a$(u):gosub35:y=22:xy$=a$(v):gosub35:y=23:xy$=a$(w):gosub35
56 ifzz=6then40
57 ss=5*t:pokes+1,ss:pokes+5,2:pokes+6,5:pokes+4,33:pokes+4,32:return
58 forx1=1226to1546step40:pokex1,peek(x1)+n:next:forx1=1913to1921
59 pokex1,peek(x1)+n:next:return
60 forx1=1070to1430step40:pokex1,peek(x1)+n:next:forx1=1719to1723
61 pokex1,peek(x1)+n:next:forx1=1759to1763:pokex1,peek(x1)+n:next:return
62 xy$=""+xy$:y=21:gosub35:y=23:xy$=" loses":gosub35:gosub40:return
63 xy$=""+xy$:y=21:gosub35:y=23:xy$=" wins":gosub35:gosub40:return
64 poke53265,27:gosub37:ifsc<2then258
65 gosub41:n=128:b=-1:pt=0
66 getz$:ifz$=""then66
67 ifz$="p"thena=1:gosub58:goto70
68 ifz$="d"thena=2:gosub60:goto70
69 gosub277:goto66
70 gosub43
71 b=b+1:ifb>1thenb=1
72 gosub37
73 gosub47
74 getz$:ifz$=""then74
75 ifz$="r"then78
76 ifz$="b"thenc=3:goto214
77 gosub277:goto74
78 ifb=1then80
79 gosub34:y=21:xy$=" come-out":gosub35:y=23:xy$=" roll":gosub35:gosub40
80 gosub34:r=30:forzz=1to6:t=int(rnd(1)*6)+1:ift=d1thent=t+1
81 ift=7thent=1
82 x=30:d1=t:gosub48:t=int(rnd(1)*6)+1:ift=d2thent=t+1
83 ift=7thent=1
84 x=35:d2=t:gosub48:next:gosub34:t=d1+d2:r=12:print""
85 gosub34:n=-128:on t-1 goto86,96,107,120,129,141,150,162,172,184,193
86 ifb=1then89
87 u=0:ifp(1)>0thengosub204:goto89
88 u=1:gosub207
89 u=0:ifp(3)>0thenu=1:c=3:w=8:gosub211
90 u=0:ifp(4)>0thenc=4:gosub211
91 ifp(5)>0thenu=1:c=5:w=3:gosub211
92 u=0:ifp(12)>0thenu=1:c=12:w=31:gosub211
93 u=0:forc=13to15:ifp(c)>0thengosub211
94 next:ifb=1then71
95 goto64
96 ifb=1then99
97 u=0:ifp(1)>0thengosub204:goto99
98 u=1:gosub207
99 u=0:ifp(3)>0thenu=1:c=3:w=8:gosub211
100 u=0:ifp(4)>0thenc=4:gosub211
101 ifp(5)>0thenu=1:c=5:w=2:gosub211
102 u=0:ifp(13)>0thenu=1:c=13:w=16:gosub211
103 u=0:ifp(14)>0thenc=14:gosub211
104 ifp(15)>0thenc=15:gosub211
105 ifb=1then71
106 goto64
107 q=0:ifb=1then109
108 poke1074,81:poke55346,6:pt=4:goto111
109 u=0:ifpt=4 and p(1)>0thenu=1:gosub204:q=1:goto111
110 ifpt=4thengosub207:q=1
111 u=0:ifp(3)>0thenc=3:gosub211
112 ifp(4)>0thenc=4:gosub211
113 ifp(5)>0thenu=1:c=5:w=2:gosub211
114 u=0:ifp(8)>0 and d1=2 and d2=2thenu=1:c=8:w=8:gosub211:goto116
115 ifp(8)>0thenc=8:gosub211
116 u=0:forc=12to15:ifp(c)>0thengosub211
117 next:ifp(16)>0thenu=1:c=16:w=3:gosub211
118 ifq=0then71
119 goto64
120 q=0:ifb=1then122
121 poke1077,81:poke55349,6:pt=5:goto124
122 u=0:ifpt=5 and p(1)>0thenu=1:gosub204:q=1:goto124
123 ifpt=5thengosub207:q=1
124 u=0:forc=3to5:ifp(c)>0thengosub211
125 next:forc=12to15:ifp(c)>0thengosub211
126 next:ifp(17)>0thenu=1:c=17:w=2.5:gosub211
127 ifq=0then71
128 goto64
129 q=0:ifb=1then131
130 poke1080,81:poke55352,6:pt=6:goto133
131 u=0:ifpt=6 and p(1)>0thenu=1:gosub204:q=1:goto133
132 ifpt=6thengosub207:q=1
133 u=0:forc=3to5:ifp(c)>0thengosub211
134 next:ifp(6)>0thenu=1:c=6:w=2:gosub211
135 u=0:ifp(9)>0 and d1=3 and d2=3thenu=1:c=9:w=10:gosub211:goto137
136 ifp(9)>0thenc=9:gosub211
137 u=0:forc=12to15:ifp(c)>0thengosub211
138 next:ifp(18)>0thenu=1:c=18:w=2.2:gosub211
139 ifq=0then71
140 goto64
141 ifb=1then144
142 u=0:ifp(2)>0thengosub207:goto146
143 u=1:gosub204:goto146
144 u=0:ifp(1)>0thengosub204:goto146
145 u=1:gosub207
146 u=0:forc=3to14:ifp(c)>0thengosub211
147 next:ifp(15)>0thenu=1:w=5:gosub211
148 u=0:forc=16to21:ifp(c)>0thengosub211
149 next:goto64
150 q=0:ifb=1then152
151 poke1083,81:poke55355,6:pt=8:goto154
152 u=0:ifpt=8 and p(1)>0thenu=1:gosub204:q=1:goto154
153 ifpt=8thengosub207:q=1
154 u=0:forc=3to5:ifp(c)>0thengosub211
155 next:ifp(7)>0thenu=1:c=7:w=2:gosub211
156 u=0:ifp(10)>0 and d1=4 and d2=4thenu=1:c=10:w=10:gosub211:goto158
157 ifp(10)>0thenc=10:gosub211
158 u=0:forc=12to15:ifp(c)>0thengosub211
159 next:ifp(19)>0t